﻿/*****************************************************************************  

 Version: 0.1
 Website: http://www.visuagile.com/
 
 Copyright (c) Yoganand R. All rights reserved.
 For continued development and updates, visit http://yogsbreath.net
 
 ******************************************************************************/

using System.Collections;
using System.Collections.Generic;
using VisualAgile.Model;
using System;

namespace VisualAgile.IBLL
{
    /// <summary>
    /// Base Management
    /// </summary>
    public interface IBaseManager<EntityT>
    {       
        /// <summary>
        /// Save entity
        /// </summary>
        /// <param name="user">用户实体</param>
        /// <returns></returns>
        EntityT Save(EntityT entity);

        /// <summary>
        /// Access to entity
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        EntityT Get(Guid id);

        /// <summary>
        /// Delete an entity
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        void Delete(Guid id);

        /// <summary>
        /// Update an entiry
        /// </summary>
        /// <param name="user">用户实体</param>
        /// <returns></returns>
        EntityT Update(EntityT entity);

        /// <summary>
        /// Access to all data
        /// </summary>
        /// <returns></returns>
        IList GetAll();
    }
}
